<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
	
	<h:head>
	<f:metadata>
        <f:viewParam name="jrid" value="#{joinVoteBean.jrid}" />
        <f:event type="preRenderView" listener="#{joinVoteBean.init}" />
   		</f:metadata>
	</h:head>
	
	<h:body>
		<ui:include src="/horizontal_menu.xhtml">
		</ui:include>
		
		<h:form>
		 <p:panel id="panel" header="#{('Request to Join from: '.concat(joinVoteBean.joinrequest.citizen.name.concat(' '.concat(joinVoteBean.joinrequest.citizen.surname))))}" style="margin-bottom:10px;">
       
        	<h:panelGrid columns="2">
        	
        		<h:graphicImage value="#{('/partysymbols//'.concat(joinVoteBean.joinrequest.party.symbol))}" width="200" height="171" />
            	<h:outputLabel for="symbol" value="#{('To join party: '.concat(joinVoteBean.joinrequest.party.name))}" />
          
            	<h:outputLabel for="program" value="CV: " />
            	<a href="#{('/DigitalStateSWProjectWeb/cvs/'.concat(joinVoteBean.joinrequest.cv))}">download curriculum vitae</a>
            	
            	<h:outputLabel for="Motivation Letter" value="Motivation Letter: " />
            	<h:outputLabel id="Letter" value="#{joinVoteBean.joinrequest.letter}" />
            	             
            </h:panelGrid>
                       	
            	Vote for this Membership Request
            	<center><h:commandButton value="Approve" action="#{joinVoteBean.accept()}" />
            	<h:commandButton value="Reject" action="#{joinVoteBean.ignore()}" /><br/>
			    <h:button value="Vote Later" outcome="/citizen/personalpage" /></center>
    
    </p:panel>
	
	</h:form>
	
	</h:body>
</html>